#ifndef     BULLET_H_
# define    BULLET_H_

# include "GameObject.h"
# include "Graphics/MainGraphic.h"

class Bullet : public GameObject
{
public:
    virtual GameObject::objtype type() { return GameObject::BULLET; }

public:
    static float const LIFESPAN = 1.5;
    static float const SPEEDADD = 400;
    static float const SLOWCOEFF = .05;
    static float const WIDTH = 29;
    static float const HEIGHT = 14;

public:
    virtual void update(float elapsedTime, IMap const & map);
    virtual void checkCollision(GameObject & oth, float const elapsedTime);
    virtual void onHit();

    void init(GameObject const * shooter);

private:
    float               _lifespan;
    GameObject const *  _shooter;
};

#endif   /* BULLET_H_ */
